object FirstJob {
  def calculator(bottles:Int, cup:Int): Int = {
    val count=bottles/3 + cup/5
    if(count==0){
      return 0
    }

    var newBottles = count + bottles %3
    var newCup = count + cup%5
    println(s"数量：$count,新添加的瓶子$newBottles 新添加的瓶盖 $newCup")
    count + calculator(newBottles,newCup)

  }
  def main(args: Array[String]): Unit = {
    val result = 50 + calculator(50,50)
    print(s"可以消费多少瓶啤酒：$result")

  }
}
